linux 上安装OpenDDS 您所在的位置:网站首页 activestate perl 58 linux 上安装OpenDDS

linux 上安装OpenDDS

2023-08-08 02:14| 来源: 网络整理| 查看: 265

1.安装PERL

使用以下安装脚本:

sh TAO -> OpenDDS ACE编译

cd $ACE_ROOT make clean make

TAO编译

cd $TAO_ROOT make clean make

OpenDDS编译

$ cd $DDS_ROOT $ ./configure $ make clean $ make

OpenDDS编译完成之后,所有的编译过程结束。

3.4 QOS库

qos库要单独编译一下

# 1. xerces-c-3.2.3编译 mkdir build cd build cmake .. make make install 注意:库编译时,用CMAKE,将编译器选项中的C++14屏蔽掉,不然后面可以会引起模板实例化失败的问题,如get_type_name()报段错误 # 2. 编译ACE_XML_Utils库 cd $ACE_ROOT/ace/XML_Utils perl $ACE_ROOT/MPC/mwc.pl -type make -features xerces=1 make 错误: /usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options. 旧的GCC编译时,若提示有错误,可能需要加上这个 -std=c++11 解决办法,在$ACE_ROOT/ace/XML_Utils下找到 MAKEFILE.ACE_XML_Utils,改为如下所示,增加了C++11的支持 COMPILE.cc = $(CXX) $(CCFLAGS) $(CPPFLAGS) -c -std=c++11 注意:库编译时,不要单独开c++11等新功能,可能不支持,引起错误,尤其是低版本的GCC # 3. 编译OpenDDS_QOS_XML_XSC_Handlerd库 cd $DDS_ROOT/dds/DCPS/QOS_XML_Handler perl $ACE_ROOT/MPC/mwc.pl -type make -features xerces=1 #修改MAKEFILE,去掉Makefile.OpenDDS_XML_QOS_XSC_Generation,这个不编译 make 4.测试

可以用python脚本来代替一些SHELL,减少学习量

import os from multiprocessing import Process #./DCPSInfoRepo -ORBDebugLevel 4 -ORBLogFile DCPSInfoRepo.log -o repo.ior -ORBListenEndpoints iiop://192.168.101.67:12345 #os.system("sleep 2") #os.system("./test -ORBDebugLevel 4 -ORBLogFile sub.log ") #os.system("./DCPSInfoRepo -ORBDebugLevel 4 -ORBLogFile pub.log") def run_proc(name): print("Run child process %s (%s)..." % (name, os.getpid())) if name=="server": os.system("./DCPSInfoRepo -ORBDebugLevel 4 -ORBLogFile DCPSInfoRepo.log -o repo.ior") elif name=="pub": os.system("sleep 2") os.system("./test -ORBDebugLevel 4 -ORBLogFile pub.log -r pub") elif name=="sub": os.system("sleep 2") os.system("./test -ORBDebugLevel 4 -ORBLogFile sub.log -r sub") if __name__=='__main__': print ('Parent process %s.' % os.getpid()) p = Process(target=run_proc, args=('server',)) print ('Process will start.') p.start() p1 = Process(target=run_proc, args=('sub',)) print ('Process sub start.') p1.start() p2 = Process(target=run_proc, args=('pub',)) print( 'Process pub start.') p2.start() 5.问题

如果出现以下问题,服务连接不上:

(2831|140737304000256) EXCEPTION, ERROR: InfoRepoDiscovery::get_dcps_info: failed to resolve ior - system exception, ID 'IDL:omg.org/CORBA/TRANSIENT:1.0' OMG minor code (2), described as 'No usable profile in IOR.', completed = NO (2831|140737304000256) ERROR: DomainParticipantImpl::enable, add_domain_participant returned invalid id. (2831|140737304000256) ERROR: DomainParticipantFactoryImpl::create_participant, unable to enable DomainParticipant.

可以修改/etc/hosts文件,使用本机IP,去掉本机IP以外的IP,包括127.0.0.1



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有